package com.hudongwx.godoffood.utils.DBUtils;

import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;

import java.io.Serializable;

/**
 * 传递一个自定义的集合时实现Serializable
 * Created by hudongwx on 16-11-12.
 */
@Table(name = "car")
public class ShoppingCar implements Serializable {
    @Column(name = "id",isId = true)
    private int id;

    @Column(name = "productID")
    private String productID;//商品id
    @Column(name = "name")
    private String name;//名称
    @Column(name = "price")
    private float price;//价格
    @Column(name = "type")
    private String type;//规格

    public ShoppingCar(String name, float price, String type, int num, String img) {
        this.name = name;
        this.price = price;
        this.type = type;
        this.num = num;
        this.img = img;
    }

    @Column(name = "num")
    private int num;//数量
    @Column(name = "img")
    private String img;//图片

    public ShoppingCar() {
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public ShoppingCar(String productID, String name, float price, String type, int num, String img) {
        this.productID = productID;
        this.name = name;
        this.price = price;
        this.type = type;
        this.num = num;
        this.img = img;
    }

    public String getProductID() {
        return productID;
    }

    public void setProductID(String productID) {
        this.productID = productID;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
}
